import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const // 创建对象
  routes = [
    {
      path: '/',
      name: 'Home',
      component: () => import('../views/Home.vue'),
      children: [
        {
          path: '/Install',
          name: 'Install',
          title: '安装',
          component: () => import('../views/Install.vue'),
        },
        {
          path: '/Color',
          name: 'Color',
          title: '颜色',
          component: () => import('../views/Color.vue'),
        },
        {
          path: '/Inlet',
          name: 'Inlet',
          title: 'App 容器',
          component: () => import('../views/Inlet.vue'),
        },
        {
          path: '/Text',
          name: 'Text',
          title: 'Text 文字',
          component: () => import('../views/Text.vue'),
        },
        {
          path: '/Button',
          name: 'Button',
          title: 'Button 按钮',
          component: () => import('../views/Button.vue'),
        },
        {
          path: '/Center',
          name: 'Center',
          title: 'Center 容器',
          component: () => import('../views/Center.vue'),
        },
        {
          path: '/Relative',
          name: 'Relative',
          title: 'Relative 容器',
          component: () => import('../views/Relative.vue'),
        },
        {
          path: '/Pair',
          name: 'Pair',
          title: 'Pair 容器',
          component: () => import('../views/Pair.vue'),
        },
        {
          path: '/Pagination',
          name: 'Pagination',
          title: 'Pagination 分页',
          component: () => import('../views/Pagination.vue'),
        }
      ]
    }
  ],
  router = new VueRouter({ routes })

export default router
